<?php
/**
 * Created by JetBrains PhpStorm.
 * User:Mihail Markitan
 * Date: 11/1/11
 * Time: 4:19 AM
 */
?>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'invoice-emp-form',
 'enableClientValidation'=>true,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>


	<div class="row">
		<?php echo $form->labelEx($model,'employeeno'); ?>
		<?php echo $form->dropDownList($model,'employeeno',$model->getEmpList()); ?>
		<?php echo $form->error($model,'employeeno'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'regularhours'); ?>
		<?php echo $form->textField($model,'regularhours',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'regularhours'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'overtimehours'); ?>
		<?php echo $form->textField($model,'overtimehours',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'overtimehours'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'laboramount'); ?>
        <div class="model-data">
                    <span id = 'laboramountvalue'></span>
                </div>
		<?php echo $form->hiddenField($model,'laboramount',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'laboramount'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'overhead'); ?>
        <div class="model-data">
                    <span id = 'overheadvalue'></span>
        </div>
		<?php echo $form->hiddenField($model,'overhead',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'overhead'); ?>
	</div>
   <div class="row">
		<?php echo $form->hiddenField($model,'invoice',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'invoice'); ?>
	</div>


	<div class="row buttons">

       <?php echo CHtml::ajaxSubmitButton('Create',CHtml::normalizeUrl(array('invoiceEmp/create')),array('success'=>'js: function(data) {
                                           empList.load();
                                         $("#addEmp").dialog("close");
                                        }'),array('id'=>'closeEmpDialog')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
 
